<template>
  <div>
    <div class="history-hot">
      <div class="his-hot">
        <div class="hd">
          <h4>历史记录</h4>
          <van-icon name="delete-o" />
        </div>
        <div class="bd">
          <van-tag
            plain
            type="primary"
            text-color="#666"
            v-for="(item, index) in historyKeywordList"
            :key="index"
            >{{ item }}</van-tag
          >
        </div>
      </div>
      <div class="his-hot">
        <div class="hd">
          <h4>热门搜索</h4>
        </div>
        <div class="bd">
          <van-tag
            plain
            :type="item.is_hot ? 'danger' : 'primary'"
            text-color="#666"
            v-for="(item, index) in hotKeywordList"
            :key="index"
            >{{ item.keyword }}</van-tag
          >
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["historyKeywordList", "hotKeywordList"],
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.his-hot {
  background-color: #fff;
  padding: 0.1rem;
  margin-bottom: 0.2rem;
  .hd {
    display: flex;
    justify-content: space-between;
    font-size: 0.18rem;
  }
  .van-tag {
    margin-right: 0.1rem;
    margin-top: 0.1rem;
    margin-bottom: 0.05rem;
  }
}
.van-tag--danger.van-tag--plain {
  color: #ee0a24 !important;
  border-color: #ee0a24 !important;
}
</style>